import React from 'react';
import moment from 'moment';
import VisitsRecords from './visitsRecords';

export default class myPatientDetail extends React.Component {
    render() {
        const age = (typeof this.props.visitInfo.Birthday) === "object" ? moment(this.props.visitInfo.Birthday.format("L"), "YYYYMMDD").fromNow() : "";
        return (<div>
            <div>患者姓名：<font color="blue">{this.props.visitInfo.Name}</font> 性别：<font color="blue">{this.props.visitInfo.Gender}</font> 年龄：<font color="blue">{age}</font> 患者来源:</div>
            <div>患者身份：*** 科别：全院 医师：诸葛亮</div>
            <hr
                className="padding-t-b"
                style={{
                    height: "1px",
                    border: "none",
                    borderTop: "1px solid #b1acac"
                }}
            />
            <h5>门诊就诊记录</h5>
            <VisitsRecords visitInfo={this.props.visitInfo}/>
        </div>
        );
    }
}
